package com.cos.lession52.aop;

import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;

/**
 * @author: COS
 * @time: 2022/3/7 10:12
 * @description: 后置增强
 */
public class MyAfterAdvice implements AfterReturningAdvice {
    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("这个就是后置增强");
        System.out.println("被增强的方法:"+method.getName());
        System.out.println("被增强的方法的返回值:"+returnValue);
    }
}
